package com.muhuahealth.service.impl;

import com.muhuahealth.dao.PipeReconstructionDao;
import com.muhuahealth.entity.PipeReconstructionEntity;
import com.muhuahealth.service.PipeReconstructionService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author GSK
 * @version 1.0
 * @date 2021/2/28 15:50
 */
@Log4j2
@Service
public class PipeReconstructionServiceImpl implements PipeReconstructionService {

    @Autowired
    PipeReconstructionDao pipeReconstructionDao;

    @Override
    public List<PipeReconstructionEntity> getSearchResult(PipeReconstructionEntity pipeRecons) {
        List<PipeReconstructionEntity> list = pipeReconstructionDao.getSearchResult(pipeRecons);
        return list;
    }

    @Override
    public String addNewPipeData(PipeReconstructionEntity reconsEntity) {

        Integer count = pipeReconstructionDao.addNewPipeData(reconsEntity);
        log.info("添加==>"+count);
        if(count > 0){
            return "添加成功";
        }
        return "添加失败";
    }
}
